package com.kara.woodAgent.common.util;

import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;

/**
 * @author tzy
 * @version 1.0
 * @project wood_agent
 * @description
 * @date 2025/6/7 17:00:11
 */
public class PasswordUtil {

	private static Digester md5 = new Digester(DigestAlgorithm.MD5);

	public static String encryptPassword(String password) {
		return md5.digestHex(password);
	}


	public static boolean checkPassword(String password, String encryptPassword) {
		return md5.digestHex(password).equals(encryptPassword);
	}
}
